//
//  LGDaoWenTableViewCell.m
//  ligenyun
//
//  Created by Mac on 2018/4/10.
//  Copyright © 2018年 stoneobs@icloud.com. All rights reserved.
//

#import "LGDaoWenTableViewCell.h"

@interface  LGDaoWenTableViewCell()
@property(nonatomic, strong) STLabel     *titleLable;
@property(nonatomic, strong) STLabel     *desLable;
@property(nonatomic, strong) STLabel     *timeLable;
@property(nonatomic, strong) STLabel     *typeLable;
@end
@implementation LGDaoWenTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self == [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self configSubView];
    }
    return self;
}
+ (CGFloat)cellHeight{
    return 110;
}
#pragma mark --subView
- (void)configSubView{
    self.backgroundColor = [UIColor whiteColor];
    
    STLabel * titleLable = [[STLabel alloc] initWithFrame:CGRectMake(15,10, UIScreenWidth - 30, 20)
                                                     text:@"stoneobs"
                                                textColor:FirstTextColor
                                                     font:15
                                              isSizetoFit:NO
                                            textAlignment:NSTextAlignmentLeft];
    self.titleLable = titleLable;
    [NSString lableAutoAdjustWitdhWithLabel:titleLable];
    [self addSubview:self.titleLable];
    
    
    STLabel * desLable = [[STLabel alloc] initWithFrame:CGRectMake(15,self.titleLable.bottom, UIScreenWidth - 30,40)
                                                   text:@"祭祀是华夏名族离店的一部分祭祀是华夏名族离店的一部分祭祀是华夏名族离店的一部分"
                                              textColor:SecendTextColor
                                                   font:13
                                            isSizetoFit:NO
                                          textAlignment:NSTextAlignmentLeft];
    self.desLable = desLable;
    [self addSubview:self.desLable];
    
    NSDate * date = [NSDate st_localCurrentDate];
    STLabel * timeLable = [[STLabel alloc] initWithFrame:CGRectMake(self.titleLable.right+30,10, UIScreenWidth / 2, 20)
                                                    text:@"2018年04月10日13:53:14"
                                               textColor:SecendTextColor
                                                    font:11
                                             isSizetoFit:NO
                                           textAlignment:NSTextAlignmentRight];
    self.timeLable = timeLable;
    [self addSubview:self.timeLable];
    timeLable.bottom = [[self class] cellHeight] - 10;
    timeLable.right = UIScreenWidth - 15;
    
    
    STLabel * typeLable = [[STLabel alloc] initWithFrame:CGRectMake(self.titleLable.right+30,10, 85, 30)
                                                    text:@"一路走好"
                                               textColor:[UIColor whiteColor]
                                                    font:12
                                             isSizetoFit:NO
                                           textAlignment:NSTextAlignmentCenter];
    self.typeLable = typeLable;
    self.typeLable.backgroundColor = TM_buttonBackGroundColor;
    [self addSubview:self.typeLable];
    typeLable.centerY = timeLable.centerY;
    typeLable.left = 15;
    
}
@end
